<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class Apks extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apks', function (Blueprint $table) {
             $table->engine = 'InnoDB';
             $table->charset = 'utf8';
             $table->collation = 'utf8_unicode_ci';
            // CONTENT
            $table->increments('id')->nullable(false)->comment('');
			$table->string('app_name', 100)->nullable(false)->comment('包名');
			$table->string('app_version', 30)->nullable(false)->comment('版本号');
			$table->boolean('app_status')->nullable(false)->default(0)->comment('1 = 启用, 0 = 禁用');
			$table->boolean('app_type')->nullable(false)->default(1)->comment('1 = donghuang, 2 = dapeng');
			$table->string('app_desc', 255)->nullable()->default(null)->comment('包描述');
			$table->integer('creater_id')->nullable(false)->comment('创建者编号');
			$table->string('app_path', 100)->nullable()->default(null)->comment('文件');
			$table->boolean('app_phone')->nullable(false)->default(1)->comment('所属手机(1=android, 2=iphone)');
			$table->string('app_http', 150)->nullable()->default(null)->comment('网络下载地址');
			$table->boolean('app_update_type')->nullable(false)->default(2)->comment('更新方式(1=整包升级, 2=资源升级, 3=差量升级)');
			$table->string('creater_name', 50)->nullable(false)->comment('创建者名称');
			$table->integer('company_id')->nullable(false)->comment('公司编号');
			$table->timestamp('created_at')->nullable()->comment('');
			$table->timestamp('updated_at')->nullable()->comment('');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('apks');
    }
}
